<?php

function smarty_function_render_label($params,
        Smarty_Internal_Template $template) {
    $question = $params["q"];
    $render = "";

    if ($question instanceof CamposFormularios) {
        $type = ucwords(strtolower($question->getTipo()));
        if ($type != "Hidden") {
            $render .= "<label for='_{$question->getId()}'>{$question->getNombreCampo()}</label>";
        }
    }

    return $render;
}

?>
